# coding=utf-8
# @Time    : 2018/3/15 10:38
# @Author  : Jiangxu
# @File    : Tkinter.py
# @Software: PyCharm
from Tkinter import *
def resize(ev=None):
    label.config(font='Helvetica -%d bold'%scale.get())

top = Tk()
top.geometry('500x750')#设置大小
label=Label(top,text='Hello World!',font='Helvetica -12 bold')
label.pack(fill=Y,expand=1)

li     = ['C','python','php','html','SQL','java']
movie  = ['CSS','jQuery','Bootstrap']
listb  = Listbox(top)          #  创建两个列表组件
listb2 = Listbox(top)
for item in li:                 # 第一个小部件插入数据
    listb.insert(0,item)

for item in movie:              # 第二个小部件插入数据
    listb2.insert(0,item)

listb.pack()                    # 将小部件放置到主窗口中
listb2.pack()

#进度条控制
scale=Scale(top,from_=10,to=40,orient=HORIZONTAL,command=resize)#10-40
scale.set(12)#初始位置
scale.pack(fill=X,expand=1)

quit = Button(top,text='qiut',command = top.quit,bg = 'red',fg='white')
quit.pack(fill = X,expand = 1)

top.mainloop()                 # 进入消息循环